package com.aiobc.file.service;

import com.aiobc.file.dto.FileUploadResp;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author fengzh
 * @className FileService
 * @date 2020/4/22 18:32
 */
public interface FileService {

    /**
     * 单文件上传
     * 
     * @param file
     * @return
     */
    FileUploadResp uploadSingle(MultipartFile file);

    /**
     * 文件批量上传
     * 
     * @param files
     * @return
     */
    List<FileUploadResp> uploadBatch(MultipartFile[] files);

    /**
     * 文件下载
     * 
     * @param response
     * @param fileName
     */
    void downLoad(HttpServletResponse response, String fileName);

}
